package com.app.designpattern.structural.composite;

import android.util.Log;

/**
 * USER: zjw
 * DATA: 2019/4/24 0024
 * TIME: 上午 10:44
 */
public class Cursor extends CataLoagComponte {
    private String name;
    private double price;

    public Cursor(String name, double price) {
        this.name = name;
        this.price = price;
    }

    @Override
    public String getName(CataLoagComponte cataLoagComponte) {
        return this.name;
    }

    @Override
    public double getPrice(CataLoagComponte cataLoagComponte) {
        return this.price;
    }

    @Override
    public void prit() {
        Log.i("componte", "Name:" + name + " price:" + price);
    }
}
